﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using WindowsLive.Writer.Api;

namespace wlwlatex {
    [WriterPluginAttribute(
        "24E0269C-D61B-11E0-A846-6D254824019B",
        "LaTeX Chart",
        Description = "A simple LaTeX render plugin for Windows Live Writer",
        HasEditableOptions = false,
        ImagePath = "formula_icon.jpg",
        PublisherUrl = "http://liselsia.org"
    )]
    [InsertableContentSourceAttribute("LaTeX Chart")]
    public class LaTeXPlugin : ContentSource {
        public override DialogResult CreateContent(IWin32Window dialogOwner, ref string content) {
			LaTeXInput input_form = new LaTeXInput();

			if (DialogResult.OK == input_form.ShowDialog()) {
				content = input_form.ResultHTML;
			}

			input_form.Dispose();
            return DialogResult.OK;
        }

    }
}
